package com.xnyzc.lhy.mis.controller.cmsapi.punishment;


import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.entity.param.punishment.OaDUserPenaltyAddParam;
import com.xnyzc.lhy.mis.entity.param.punishment.OaDUserPenaltyImportParam;
import com.xnyzc.lhy.mis.entity.param.punishment.OaDUserPenaltyQueryParam;
import com.xnyzc.lhy.mis.service.punishment.IOaDUserPunishmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 司机处罚内容表 前端控制器
 * </p>
 *
 * @author cuichaoqun
 * @since 2019-10-27
 */
@RestController
@Api(value="添加司机处罚内容",tags={"添加司机处罚内容"})
@RequestMapping("/cmsapi/oaDUserPunishment")
public class OaDUserPunishmentController {
    @Autowired
    private IOaDUserPunishmentService iOaDUserPunishmentService;

    /**
     * 添加司机处罚内容
     * */
    @ApiOperation(value = "添加司机处罚内容", notes = "添加司机处罚内容")
    @PostMapping(value = "/addDriverPenaltyList")
    public Rv addDriverPenaltyList(@RequestBody List<OaDUserPenaltyAddParam> oaDUserPenaltyAddParams) {
        return iOaDUserPunishmentService.addDriverPenaltyList(oaDUserPenaltyAddParams);
    }

    /**
     * 批量导入处罚信息
     **/
    @ApiOperation(value = "批量导入处罚信息", notes = "批量导入处罚信息")
    @PostMapping(value = "/importDriverPenaltyList")
    public Rv importDriverPenaltyList(@RequestBody List<OaDUserPenaltyImportParam> oaDUserPenaltyImportParam) {
        return iOaDUserPunishmentService.importDriverPenaltyList(oaDUserPenaltyImportParam);
    }
}
